package order;

public class OrderString {
	
	public String str1;
	public String str2;
	public String str3;
	
	public OrderString(String s1, String s2, String s3){
		sort(s1,s2,s3);
	}
	
	private void sort(String s1, String s2, String s3){
		if(s1.compareTo(s2)<0){
			if(s1.compareTo(s3)<0){
				str1 = s1;
				if(s2.compareTo(s3)<0){
					str2 = s2;
					str3 = s3;
				}
				else{
					str2 = s3;
					str3 = s2;
				}
			}
			else{
				str1 = s3;
				str2 = s1;
				str3 = s2;
			}
		}
		else{
			if(s1.compareTo(s3)<0){
				str1 = s2;
				str2 = s1;
				str3 = s3;
			}
			else{
				str3 = s1;
				if(s2.compareTo(s3)<0){
					str1 = s2;
					str2 = s3;
				}
				else{
					str1 = s3;
					str2 = s2;
				}
			}
		}
	}

	public String get1st(){
		return str1;
	}
	
	public String get2nd(){
		return str2;
	}
	
	public String get3rd(){
		return str3;
	}

}
